// 链式调用

class Demo{
    constructor(dd = []){
        this.dd = dd;
    }

    append(v){
        this.dd.push(v);
        return this;
    }

    toString(){
        return this.dd.join("&");
    }
}

// 测试
const d = new Demo([]);
let cc = d.append(10).append(20).append(30).toString();
console.log(cc);
